﻿using Architecture.Api.Application.Commands.CultureCommand;
using Architecture.Domain.Services.Interface;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.CultureHandler
{
    public class CultrueBatchCorporationPicCommandHandler : IRequestHandler<CultrueBatchCorporationPicCommand, int>
    {
        private readonly ICultureService _cultureService;

        public CultrueBatchCorporationPicCommandHandler(ICultureService cultureService)
        {
            _cultureService = cultureService;
        }

        public async Task<int> Handle(CultrueBatchCorporationPicCommand request, CancellationToken cancellationToken)
        {
            return await _cultureService.BatchCorporationPicList(request.productionLot, request.urlImg, request.cId);
        }
    }
}
